package com.ruoyi.ams.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.ams.domain.AmsAssetInventory;
import com.ruoyi.ams.mapper.AmsAssetInventoryMapper;
import com.ruoyi.ams.service.IAmsAssetInventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 盘点单Service业务层处理
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Service
public class AmsAssetInventoryServiceImpl extends ServiceImpl<AmsAssetInventoryMapper, AmsAssetInventory>  implements IAmsAssetInventoryService
{
    @Autowired
    private AmsAssetInventoryMapper amsAssetInventoryMapper;

    /**
     * 查询盘点单
     * 
     * @param inventoryId 盘点单主键
     * @return 盘点单
     */
    @Override
    public AmsAssetInventory selectAmsAssetInventoryByInventoryId(Long inventoryId)
    {
        return amsAssetInventoryMapper.selectAmsAssetInventoryByInventoryId(inventoryId);
    }

    /**
     * 查询盘点单列表
     * 
     * @param amsAssetInventory 盘点单
     * @return 盘点单
     */
    @Override
    public List<AmsAssetInventory> selectAmsAssetInventoryList(AmsAssetInventory amsAssetInventory)
    {
        return amsAssetInventoryMapper.selectAmsAssetInventoryList(amsAssetInventory);
    }

    /**
     * 新增盘点单
     * 
     * @param amsAssetInventory 盘点单
     * @return 结果
     */
    @Override
    public int insertAmsAssetInventory(AmsAssetInventory amsAssetInventory)
    {
        return amsAssetInventoryMapper.insertAmsAssetInventory(amsAssetInventory);
    }

    /**
     * 修改盘点单
     * 
     * @param amsAssetInventory 盘点单
     * @return 结果
     */
    @Override
    public int updateAmsAssetInventory(AmsAssetInventory amsAssetInventory)
    {
        return amsAssetInventoryMapper.updateAmsAssetInventory(amsAssetInventory);
    }

    /**
     * 批量删除盘点单
     * 
     * @param inventoryIds 需要删除的盘点单主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetInventoryByInventoryIds(Long[] inventoryIds)
    {
        return amsAssetInventoryMapper.deleteAmsAssetInventoryByInventoryIds(inventoryIds);
    }

    /**
     * 删除盘点单信息
     * 
     * @param inventoryId 盘点单主键
     * @return 结果
     */
    @Override
    public int deleteAmsAssetInventoryByInventoryId(Long inventoryId)
    {
        return amsAssetInventoryMapper.deleteAmsAssetInventoryByInventoryId(inventoryId);
    }
}
